热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Addanewlint`ptr_as_ptr`

ThisPRaddsanewlint

This PR adds a new lint

1
ptr_as_ptr

which checks for

1
as

casts between raw pointers without changing its mutability and suggest replacing it with

1
pointer::cast

. Closes #5890.

Open question: should this lint be

1
pedantic

or

1
style

? I set it

1
pedantic

for now because the original post suggests using it, but I think the lint also fits well to

1
style

.

changelog: New lint

1
ptr_as_ptr

该提问来源于开源项目:rust-lang/rust-clippy

:sunny: Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing a6b72d378f71ed8d2c6849d97571a4c1d8e27afa to master...





   



推荐阅读
author-avatar
祢好世界末日
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有